﻿@model Bricks.Business.Models.BidManagement.BidInfo

@{
    ViewBag.Title = "预览";
    Layout = "~/Views/Shared/_UserPage.cshtml";
}

<script type="text/javascript">
    $(function () {
        initTable();  //当页面首次刷新的时候执行的事件
    });

    function initTable(queryData) {
        $('#sectionGrid').datagrid({
            url: '/BidInfo/GetSectionList?bidID=' + $("#hID").val(),
            iconCls: 'icon-bricks',
            nowrap: true,
            autoRowHeight: true,
            striped: true,
            collapsible: true,
            pagination: false,
            rownumbers: true,
            remoteSort: false,
            idField: 'ID',
            singleSelect: true,
            queryParams: queryData,  //异步查询的参数
            columns: [[
                { title: '发包标段名称', field: 'SectionName', width: 160, sortable: true },
                {
                    title: '招标文件', field: 'BidFile', width: 80, align: 'center',
                    formatter: function (value, row, index) {
                        return "<a href='javascript:void(0)' class='easyui-linkbutton' onclick='$.Upload(\"" + row.ID + "\", \"BidManagement/BidInfo/BidFile\",true)' data-options='plain:true,iconCls:\"icon-blue_lego\"'>附件操作</a>";
                    }
                },
                { title: '中标单位', field: 'BidUnit', width: 150, sortable: true },
                { title: '中标额', field: 'BidMoney', width: 80, sortable: true },
                {
                    title: '投标文件', field: 'EnterBidFile', width: 80, align: 'center',
                    formatter: function (value, row, index) {
                        return "<a href='javascript:void(0)' class='easyui-linkbutton' onclick='$.Upload(\"" + row.ID + "\", \"BidManagement/BidInfo/EnterBidFile\",true)' data-options='plain:true,iconCls:\"icon-blue_lego\"'>附件操作</a>";
                    }
                }
            ]]
        });
    }
</script>

<div class="frombox datagrid-body" style="padding-bottom: 5px;">
    <form id="bid-model" method="post">
        <table class="datagrid-btable" border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">项目名称</div>
                </td>
                <td class="td" colspan="5">
                    <div class="datagrid-cell">
                        <input id="projectID" name="ProjectID" data-options="required:true" value="@Model.ProjectID" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">登记人</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="RegisterUser" class="easyui-textbox" data-options="required:false" value="@ViewBag.RegisterUser" style="background:#eeeeee;" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">登记日期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="RegisterDate" class="easyui-textbox" data-options="required:false" value="@Model.RegisterDate" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">招标日期</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="BidDate" class="easyui-textbox" data-options="required:false" value="@Model.BidDate" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">招标形式</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="bidType" name="BidType" data-options="required:false" style="width:160px;" value="@Model.BidType" editable="false" />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">招标代理</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input id="bidAgent" name="BidAgent" data-options="required:false" value="@Model.BidAgent" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell"></div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">招标联系人</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="BidContactPerson" data-options="required:false" value="@Model.BidContactPerson" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell">联系电话</div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                        <input name="BidContactTel" class="easyui-textbox" data-options="required:false" value="@Model.BidContactTel" readonly />
                    </div>
                </td>
                <td class="rth">
                    <div class="datagrid-cell"></div>
                </td>
                <td class="td">
                    <div class="datagrid-cell">
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">标题</div>
                </td>
                <td class="td" colspan="5">
                    <div class="datagrid-cell">
                        <input name="BidTitle" class="easyui-textbox" data-options="required:false" style="width:670px;" value="@Model.BidTitle" readonly />
                    </div>
                </td>
            </tr>
            <tr class="datagrid-row">
                <td class="th">
                    <div class="datagrid-cell">描述</div>
                </td>
                <td class="td" colspan="5">
                    <div class="datagrid-cell">
                        <textarea name="BidDescription" cols="93" rows="3" readonly>@Model.BidDescription</textarea>
                    </div>
                </td>
            </tr>
            <!--标段列表-->
            <tr class="datagrid-row">
                <td class="td" colspan="6">
                    <div class="datagrid-cell">
                        <div class="easyui-panel" title="标段列表">
                            <table id="sectionGrid" style="height: 210px; width: 775px;"></table>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <input name="ID" id="hID" type="hidden" value="@Model.ID" />
        <input name="RegisterUserID" type="hidden" value="@Model.RegisterUserID" />
        <input name="IsDeleted" type="hidden" value="@Model.IsDeleted" />
        <input name="AddDate" type="hidden" value="@Model.AddDate" />
    </form>
</div>
